<nb-card>
  <nb-card-header>
    <span>添加节点至网络</span>
  </nb-card-header>
  <nb-card-body>
    <div class="row">
      <div class="col-lg-12">
        <div class="form-group">
          <label for="inputFirstName">IP地址</label>
          <input type="text" class="form-control" id="inputFirstName" name="ip" [(ngModel)]="ip" placeholder="IP address">
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-lg-12">
        <div class="form-group">
          <label for="inputLastName">HTTP端口号</label>
          <input type="text" class="form-control" id="inputLastName" name="port" [(ngModel)]="port" placeholder="Port">
        </div>
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-lg-12"><button type="submit" class="btn btn-hero btn-primary" (click)="testPeer()">测试节点是否启动</button></div>
    </div>
    <br>
    <div class="row">
      <div class="col-lg-12"><button type="submit" class="btn btn-hero btn-success" (click)="addPeer()" [disabled]="isTest">添加节点</button></div>
    </div>
  </nb-card-body>
  <nb-card-footer>
    注：请确保端口号按照<strong> P2P端口号 = HTTP端口号 + 3000 </strong>的规则设置节点
  </nb-card-footer>
</nb-card>
